# Create an onboarding link for a merchant

Creates a new onboarding link for a merchant. Important: Creating a new link will automatically expire all previous onboarding links for the same merchant.

Endpoint: POST /v1/onboarding_links
Version: v1
Security: api-key-secret

## Security:

  - `api-key-secret` (unknown)
    http basic

## Request fields (application/json):

  - `merchant_id` (string, required)

  - `return_url` (string)
    URL to redirect after onboarding completion
    Example: https://dashboard.example.com?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

  - `type` (string, required)
    Enum: "account_onboarding"

  - `allow_skip_device_selection` (boolean)
    Allow the merchant to continue past device selection without choosing a device, after confirming they will supply their own compatible one. Omit to inherit your account default. Only has an effect where device selection is required for your account.
    Example: true

  - `attribution` (object)
    IRIS attribution to assign to the merchant's lead when the link is created.

  - `attribution.user_id` (number, required)
    Primary IRIS user ID (agent) to assign to the lead
    Example: 12345

  - `attribution.channel_id` (number)
    IRIS channel / group ID
    Example: 67890

  - `attribution.source_id` (number)
    IRIS source ID
    Example: 42

  - `attribution.rsl_user_id` (number)
    IRIS RSL user ID
    Example: 11111

  - `attribution.referral_partner_user_id` (number)
    IRIS referral partner user ID
    Example: 22222

## Response 201:

  - `201` (unknown)
    Create an onboarding link for a merchant. Note: Creating a new link will expire all previous onboarding links for the same merchant.

## Response 201 fields (application/json):

  - `url` (string, required)
    The URL of the onboarding link with token
    Example: https://dashboard.example.com?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

  - `id` (string, required)
    The ID of the onboarding link

  - `expires_at` (string, required)
    The expiration date of the onboarding link

  - `merchant_id` (string, required)
    The merchant ID associated with this onboarding link

